//************************************************************************
/// <copyrigth>2024-2025 Corporation.All Rights Reserved</copyrigth>
/// <author>tangyingzhong</author>
/// <contact>tangyz114987@outlook.com</contact>
/// <version>v1.0.0</version>
/// <describe>
/// Cross-Platform logger
///</describe>
/// <date>2024/2/4</date>
///***********************************************************************
#ifndef SYSTEMLOGGER_H
#define SYSTEMLOGGER_H

#include "spdlog/common.h"
#include "spdlog/spdlog.h"
#include "Logger.h"

#define INIT_FILE_LOGGER(ModuleName,LogFilePath) SystemTool::Logger::GetInstance()->AddFileLogger(ModuleName,LogFilePath);
#define INIT_CONSOLE_LOGGER(ModuleName) SystemTool::Logger::GetInstance()->AddConsoleLogger(ModuleName);

#define LOGD(ModuleName, ...) SPDLOG_LOGGER_DEBUG(SystemTool::Logger::GetInstance()->GetLogger(ModuleName), __VA_ARGS__);

#define LOGI(ModuleName, ...) SPDLOG_LOGGER_INFO(SystemTool::Logger::GetInstance()->GetLogger(ModuleName), __VA_ARGS__);

#define LOGW(ModuleName, ...) SPDLOG_LOGGER_WARN(SystemTool::Logger::GetInstance()->GetLogger(ModuleName), __VA_ARGS__);

#define LOGE(ModuleName, ...) SPDLOG_LOGGER_ERROR(SystemTool::Logger::GetInstance()->GetLogger(ModuleName), __VA_ARGS__);

#endif // SYSTEMLOGGER_H
